home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
boost4.arc
/
VERIFY.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-10-23
|
1KB
|
54 lines
Program VerifyMain;
{ Demos Boosters' Verify function }
uses BOSHARE,crt;
var
s,ref : String;
i,j,
VerifyResult : integer;
c : char;
Const
Esc = #27;
BEGIN
{--- Define reference set }
ref := 'ABCD,FGHIJKLMNOPQRSTUVWXYZ';
repeat { until ESCAPE pressed }
ClrScr;
PutStr(h,Center('Type a phrase, then press ENTER',80,' '),1,1,14);
PutStr(h,Center('All characters NOT in reference set will be flagged',
80,' '),1,2,14);
PutStr(h,center('Reference Set',80,' '),1,4,14);
PutStr(h,center(ref,80,' '), 1, 5, 14 );
{--- Get phrase from user }
input ( 1, 6, Copies('C',80), s, c, 30 );
{--- Flag each character not in ref }
if c <> Esc then
begin
s := strip(s,' ');
i := 1;
VerifyResult := verify(s,ref,i);
while VerifyResult <> 0 do
begin
PutStr(h,'^',VerifyResult, 7, 14 );
i := VerifyResult + 1;
VerifyResult := verify(s,ref,i);
end;
{ Wait for keypress }
PutStr(h,'ESCAPE quits, any other key continues.',1,9,14);
c := readkey;
if c =#0 then c := readkey;
end;
until c = Esc;
END.